home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8159 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  724 b 

  1. Path: kari.fm.unit.no!rustad
  2. From: rustad@fm.unit.no (Rolf Rustad)
  3. Newsgroups: comp.lang.c++
  4. Subject: Constructors for objects that can be FALSE
  5. Date: 15 Feb 1996 08:53:46 GMT
  6. Organization: The Norwegian University of Science and Technology
  7. Message-ID: <4fusaq$g1e@due.unit.no>
  8. NNTP-Posting-Host: kari.fm.unit.no
  9. X-Newsreader: TIN [version 1.1 PL6]
  10.  
  11. Hi
  12. I'm writting control software for instrumentation applications, using BC++.
  13. I'm creating classes, like Camera and Syntesizer etc.
  14. What I would like is to make objects of these classes evaluate to FALSE
  15. if the physical device is not present or available, as do for instanse 
  16. ifpstream:
  17.  
  18.  ifpstream is(filename); 
  19.  if(!is){
  20.  .
  21.  .
  22.  }
  23.  
  24. How do I write the constructor??
  25.  
  26. Rolf
  27.